package com.winshare.saleAssistant.mapper;

import com.winshare.saleAssistant.domain.entity.MenuDO;
import com.winshare.saleAssistant.domain.entity.RoleDO;
import com.winshare.saleAssistant.domain.query.RoleQuery;
import com.winshare.saleAssistant.domain.dto.req.*;
import com.winshare.saleAssistant.domain.dto.resp.RoleRespDTO;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface RoleMapStruct {
    
    RoleMapStruct INSTANCE = Mappers.getMapper(RoleMapStruct.class);

    RoleDO fromRoleCreateDTO(RoleCreateDTO roleCreateDTO);

    MenuDTO fromMenuDO(MenuDO menuDO);

    RoleDO fromRoleUpdateDTO(RoleUpdateDTO roleUpdateDTO);

    RoleDO fromRoleDeleteDTO(RoleDeleteDTO roleDeleteDTO);

    RoleQuery fromRoleQueryDTO(RoleQueryDTO roleQueryDTO);

    RoleRespDTO toRoleRespDTO(RoleDO roleDO);

    List<RoleRespDTO> toRoleRespDTOList(List<RoleDO> roleDOList);

    RoleDO fromRoleSettingPersonDTO(RoleSettingPeronDTO roleSettingPeronDTO);

    RoleDO fromBaseIdDTO(BaseIdDTO baseIdDTO);
}
